package day10.Exer;

public class Rectage extends Diagram{
    private double length;
    private double width;

    public Rectage(String name,double length, double width) {
        super(name);
        this.length = length;
        this.width = width;
    }

    public double getLength() {
        return length;
    }

    public void setLength(double length) {
        this.length = length;
    }

    public double getWidth() {
        return width;
    }

    public void setWidth(double width) {
        this.width = width;
    }

    @Override
    public double getarea() {
        return length*width;
    }

    @Override
    public double getperimeter() {
        return 2*(length+width);
    }
}

